package com.mcxx.modules.base.service.read;

import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import com.yinhai.ta404.module.dict.entity.TaDictCache;
import com.yinhai.ta404.module.dict.entity.TaDictPo;
import com.yinhai.ta404.module.dict.service.read.DictCacheService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("dictionaryReadServiceImpl")
@TaTransactional(readOnly = true)
public class DictionaryReadService {
    @Autowired
    private DictCacheService dictCacheService;

    public TaDictPo getCodeCache(String type, String value) {
        TaDictPo dictPo = dictCacheService.getCodeCache(type, value, "0");
        return dictPo;
    }


    public TaDictCache getTaDictCache(String type) {
        TaDictCache taDictCache  = dictCacheService.getCodeCache(type, false);
        return taDictCache;
    }
}
